package com.chy.myrule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RoundRobinRule;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.context.annotation.Bean;

@SpringBootConfiguration
public class CustomizeRule {
    @Bean
    public IRule myRule(){
        return new RoundRobinRule(); // 默认轮询，现在是我们自定义为ChyRandomRule
    }
}
